package com.atguigu.gulimall.order.feign;

import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.vo.WareStockVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient("gulimall-ware")
public interface WareFeign {
    /**
     * 根据skuid查询库存信息
     */
    @PostMapping("ware/waresku/skuIds")
     R findSkuStock(@RequestBody List<Long> skuIds);

    /**
     * 锁库存
     */
    @PostMapping("ware/waresku/stock")
    public R wareStock(@RequestBody WareStockVo vo);
}
